//
//  IntegralActivityViewController.m
//  PeopleStreet
//
//  Created by 辰领科技 on 16/10/26.
//  Copyright © 2016年 yuf. All rights reserved.
//

#import "IntegralActivityViewController.h"
#import "IntegralActivityTableViewCell.h"

@interface IntegralActivityViewController ()
<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UIScrollView *navView;
@property (weak, nonatomic) IBOutlet UITableView *tableview;

@end

@implementation IntegralActivityViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initViewLayout];
}

- (void)initViewLayout{
    [self adaptiveViewLayout:self.view];
    [self adaptiveViewLayout:self.navView];
    self.tableview.delegate = self;
    self.tableview.dataSource = self;

}
- (IBAction)back:(id)sender {
    [self.navigationController  popViewControllerAnimated:YES];
}

#pragma mark -- UITableViewDataSource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 140*VerticalRatio();
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 5;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    IntegralActivityTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IntegralActivity"];
    if (cell == nil) {
        cell= [[IntegralActivityTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"IntegralActivity"];
        
    }
    
    for (UIView *view in cell.subviews) {
        if ([view isKindOfClass:[UILabel class]] ||[view isKindOfClass:[UIImageView class]]||[view isKindOfClass:[UIScrollView class]]||[view isKindOfClass:[UIButton class]]) {
            [view removeFromSuperview];
        }
    }
    return cell;
}

@end
